diff options
Diffstat (limited to 'src/routes/projects/[id]/+page.svelte')
| -rw-r--r-- | src/routes/projects/[id]/+page.svelte | 106 |
1 files changed, 8 insertions, 98 deletions
diff --git a/src/routes/projects/[id]/+page.svelte b/src/routes/projects/[id]/+page.svelte index 608bbbb..c69d066 100644 --- a/src/routes/projects/[id]/+page.svelte +++ b/src/routes/projects/[id]/+page.svelte @@ -36,16 +36,16 @@ } function scoreClass(score: number): string { - if (score >= 80) return 'score score--good'; - if (score >= 50) return 'score score--mid'; - return 'score score--bad'; + if (score >= 80) return 'score bg-success'; + if (score >= 50) return 'score bg-accent'; + return 'score bg-danger'; } function statusClass(status: RoutineState['status']): string { - if (status === 'ok') return 'status status--ok'; - if (status === 'due') return 'status status--due'; - if (status === 'late') return 'status status--late'; - return 'status status--very-late'; + if (status === 'ok') return 'status bg-success text-white'; + if (status === 'due') return 'status bg-accent-soft text-accent'; + if (status === 'late') return 'status bg-accent text-white'; + return 'status bg-danger text-white'; } </script> @@ -56,7 +56,7 @@ </header> <form - class="cat-add-bar" + class="add-bar" method="POST" action="?/addRoutine" use:enhance={() => { @@ -272,35 +272,6 @@ border-color: var(--danger); } - .status { - flex-shrink: 0; - padding: 0.25rem 0.5rem; - border-radius: 9999px; - font-size: 0.75rem; - font-weight: 600; - white-space: nowrap; - } - - .status--ok { - background: var(--success); - color: var(--white); - } - - .status--due { - background: var(--shadow-accent); - color: var(--accent); - } - - .status--late { - background: var(--accent); - color: var(--white); - } - - .status--very-late { - background: var(--danger); - color: var(--white); - } - .btn-done { flex-shrink: 0; padding: 0.5rem 0.875rem; @@ -318,67 +289,6 @@ transform: translateY(-1px); } - .score { - flex-shrink: 0; - min-width: 2.75rem; - padding: 0.25rem 0.5rem; - border-radius: 9999px; - text-align: center; - font-size: 0.875rem; - font-weight: 700; - color: var(--white); - } - - .score--good { - background: var(--success); - } - - .score--mid { - background: var(--accent); - } - - .score--bad { - background: var(--danger); - } - - .cat-add-bar { - display: flex; - gap: 0.5rem; - padding: 0.75rem 0; - } - - .cat-add-bar input:first-child { - flex: 1; - background: var(--surface); - min-width: 0; - } - - .btn-accent { - width: 3rem; - height: 3rem; - flex-shrink: 0; - padding: 0; - border: none; - border-radius: 0.75rem; - background: var(--accent); - color: var(--white); - font-size: 1.25rem; - font-weight: 500; - font-family: inherit; - cursor: pointer; - display: flex; - align-items: center; - justify-content: center; - transition: all 0.2s ease; - box-shadow: 0 1px 2px var(--shadow); - } - - .btn-accent:hover { - background: var(--accent-hover); - transform: translateY(-1px); - box-shadow: 0 4px 8px var(--shadow-accent-lg); - } - .page-footer { margin-top: 2rem; display: flex; |
